using System;
using System.Data;
using System.Collections;
using APP.QUANLY.Common;

namespace RMAS.DAL
{
    /// <summary>
    /// Summary description for DM_PARTNERINFO.
    /// </summary>
    public class DM_PARTNERINFO
    {
              private Int32 _PartnerID;
      private Int32 _TypePartner;
      private string _Name;
      private string _Address;
      private string _Phone;
      private string _Fax;
      private string _Email;
      private double _First;
      private double _PromoteTime;
      private double _PromoteAll;
      private bool _IsVIP;
      private string _IDPOS;
      private DM_VIPCARDList _listDM_VIPCARD;
      private QT_IMPORTBILLList _listQT_IMPORTBILL;
        private bool isExisting;
        #region Properties
        public bool IsExisting
        {
              get{return isExisting;}
              set{isExisting = value;}
        }
	      public bool IsSetPartnerID; 
      public bool IsPartnerIDNullable   
      { 
	 get { return false;  } 
      }
      public Int32 PartnerID
      {
         get { return _PartnerID; }
         set 
	    { 
 		 _PartnerID = value;
		IsSetPartnerID = true;
 	    }
      }
    public bool IsSetTypePartner; 
    public bool IsTypePartnerNullable   
    { 
		get { return false;  } 
    }
    public Int32 TypePartner
    {
        get{ return _TypePartner;  }
        set
		{
			_TypePartner = value;
			IsSetTypePartner = true;
		}
    }
    public bool IsSetName; 
    public bool IsNameNullable   
    { 
		get { return false;  } 
    }
    public string Name
    {
        get{ return _Name;  }
        set
		{
			_Name = value;
			IsSetName = true;
		}
    }
    public bool IsSetAddress; 
    public bool IsAddressNullable   
    { 
		get { return false;  } 
    }
    public string Address
    {
        get{ return _Address;  }
        set
		{
			_Address = value;
			IsSetAddress = true;
		}
    }
    public bool IsSetPhone; 
    public bool IsPhoneNullable   
    { 
		get { return false;  } 
    }
    public string Phone
    {
        get{ return _Phone;  }
        set
		{
			_Phone = value;
			IsSetPhone = true;
		}
    }
    public bool IsSetFax; 
    public bool IsFaxNullable   
    { 
		get { return false;  } 
    }
    public string Fax
    {
        get{ return _Fax;  }
        set
		{
			_Fax = value;
			IsSetFax = true;
		}
    }
    public bool IsSetEmail; 
    public bool IsEmailNullable   
    { 
		get { return false;  } 
    }
    public string Email
    {
        get{ return _Email;  }
        set
		{
			_Email = value;
			IsSetEmail = true;
		}
    }
    public bool IsSetFirst; 
    public bool IsFirstNullable   
    { 
		get { return false;  } 
    }
    public double First
    {
        get{ return _First;  }
        set
		{
			_First = value;
			IsSetFirst = true;
		}
    }
    public bool IsSetPromoteTime; 
    public bool IsPromoteTimeNullable   
    { 
		get { return false;  } 
    }
    public double PromoteTime
    {
        get{ return _PromoteTime;  }
        set
		{
			_PromoteTime = value;
			IsSetPromoteTime = true;
		}
    }
    public bool IsSetPromoteAll; 
    public bool IsPromoteAllNullable   
    { 
		get { return false;  } 
    }
    public double PromoteAll
    {
        get{ return _PromoteAll;  }
        set
		{
			_PromoteAll = value;
			IsSetPromoteAll = true;
		}
    }
    public bool IsSetIsVIP; 
    public bool IsIsVIPNullable   
    { 
		get { return false;  } 
    }
    public bool IsVIP
    {
        get{ return _IsVIP;  }
        set
		{
			_IsVIP = value;
			IsSetIsVIP = true;
		}
    }
    public bool IsSetIDPOS; 
    public bool IsIDPOSNullable   
    { 
		get { return false;  } 
    }
    public string IDPOS
    {
        get{ return _IDPOS;  }
        set
		{
			_IDPOS = value;
			IsSetIDPOS = true;
		}
    }
public DM_VIPCARDList DM_VIPCARDList 
{ 
	get { return _listDM_VIPCARD; }
	set { _listDM_VIPCARD = value;}
}
public QT_IMPORTBILLList QT_IMPORTBILLList 
{ 
	get { return _listQT_IMPORTBILL; }
	set { _listQT_IMPORTBILL = value;}
}

        #endregion

        #region Constructors
        public DM_PARTNERINFO()
        {
            Reset();
        }
        public DM_PARTNERINFO(DM_PARTNERINFO obj)
        {
            	this._PartnerID = obj.PartnerID;
	this._TypePartner = obj.TypePartner;
	this._Name = obj.Name;
	this._Address = obj.Address;
	this._Phone = obj.Phone;
	this._Fax = obj.Fax;
	this._Email = obj.Email;
	this._First = obj.First;
	this._PromoteTime = obj.PromoteTime;
	this._PromoteAll = obj.PromoteAll;
	this._IsVIP = obj.IsVIP;
	this._IDPOS = obj.IDPOS;
        }
        #endregion

        public void Reset()
        {
                     _PartnerID = EmptyValues.v_Int32;
         _TypePartner = EmptyValues.v_Int32;
         _Name = EmptyValues.v_string;
         _Address = EmptyValues.v_string;
         _Phone = EmptyValues.v_string;
         _Fax = EmptyValues.v_string;
         _Email = EmptyValues.v_string;
         _First = EmptyValues.v_double;
         _PromoteTime = EmptyValues.v_double;
         _PromoteAll = EmptyValues.v_double;
         _IsVIP = EmptyValues.v_bool;
         _IDPOS = EmptyValues.v_string;
	_listDM_VIPCARD = null;
	_listQT_IMPORTBILL = null;
        }

         
        #region Hidden

        /*
        private void readProperties(IDataReader reader)
        {
            try
            {
                                if(!(reader["PartnerID"] is DBNull))
		{
			obj.PartnerID = (Int32)reader["PartnerID"];
		}
                if(!(reader["TypePartner"] is DBNull))
		{
			obj.TypePartner = (Int32)reader["TypePartner"];
		}
                if(!(reader["Name"] is DBNull))
		{
			obj.Name = (string)reader["Name"];
		}
                if(!(reader["Address"] is DBNull))
		{
			obj.Address = (string)reader["Address"];
		}
                if(!(reader["Phone"] is DBNull))
		{
			obj.Phone = (string)reader["Phone"];
		}
                if(!(reader["Fax"] is DBNull))
		{
			obj.Fax = (string)reader["Fax"];
		}
                if(!(reader["Email"] is DBNull))
		{
			obj.Email = (string)reader["Email"];
		}
                if(!(reader["First"] is DBNull))
		{
			obj.First = (double)reader["First"];
		}
                if(!(reader["PromoteTime"] is DBNull))
		{
			obj.PromoteTime = (double)reader["PromoteTime"];
		}
                if(!(reader["PromoteAll"] is DBNull))
		{
			obj.PromoteAll = (double)reader["PromoteAll"];
		}
                if(!(reader["IsVIP"] is DBNull))
		{
			obj.IsVIP = (bool)reader["IsVIP"];
		}
                if(!(reader["IDPOS"] is DBNull))
		{
			obj.IDPOS = (string)reader["IDPOS"];
		}
//            _PartnerID = (reader["PartnerID"] is DBNull)?DalTools.EmptyValues.v_Int32:(Int32)reader["PartnerID"];
//            _TypePartner = (reader["TypePartner"] is DBNull)?DalTools.EmptyValues.v_Int32:(Int32)reader["TypePartner"];
//            _Name = (reader["Name"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["Name"];
//            _Address = (reader["Address"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["Address"];
//            _Phone = (reader["Phone"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["Phone"];
//            _Fax = (reader["Fax"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["Fax"];
//            _Email = (reader["Email"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["Email"];
//            _First = (reader["First"] is DBNull)?DalTools.EmptyValues.v_double:(double)reader["First"];
//            _PromoteTime = (reader["PromoteTime"] is DBNull)?DalTools.EmptyValues.v_double:(double)reader["PromoteTime"];
//            _PromoteAll = (reader["PromoteAll"] is DBNull)?DalTools.EmptyValues.v_double:(double)reader["PromoteAll"];
//            _IsVIP = (reader["IsVIP"] is DBNull)?DalTools.EmptyValues.v_bool:(bool)reader["IsVIP"];
//            _IDPOS = (reader["IDPOS"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["IDPOS"];
            }
            catch (Exception ex)
            {
                throw new DalException("Failed to read properties from DataReader.", ex);
            }
        } 
        */

        #endregion


        public void Fill(Int32 PartnerID, Int32 TypePartner, string Name, string Address, string Phone, string Fax, string Email, double First, double PromoteTime, double PromoteAll, bool IsVIP, string IDPOS)
        {
                     this._PartnerID = PartnerID;
         this._TypePartner = TypePartner;
         this._Name = Name;
         this._Address = Address;
         this._Phone = Phone;
         this._Fax = Fax;
         this._Email = Email;
         this._First = First;
         this._PromoteTime = PromoteTime;
         this._PromoteAll = PromoteAll;
         this._IsVIP = IsVIP;
         this._IDPOS = IDPOS;
        }
    }
}